-
-
Notifications
You must be signed in to change notification settings - Fork 57
chore: hoist mf plugin to global #656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rslib ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
fi3ework
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change for functionality reason, or just polish code style?
functionality reason, we may inject variables for runtime api in the future , so the plugin need to be hoisted as global plugin . If not , we can only affect the mf type asset , the other assets will be crashed without injecting our expected variables. |
So if there's a lib config which is a pure ESM or CJS output without any MF stuff, how could it bail out from runtime injecting of the plugin? I guess something like below? [
{ plugins: [mfPlugin]}, // MF related lib
{ plugins: [mfPlugin]}, // MF related lib
{ plugins: []}, // non-MF related lib
] |
|
What if there are multiple objects in And we have supported |
|
@2heal1 Do we need an update? |
|
It only affect format: 'mf' by checking the library.type https://github.com/module-federation/core/blob/main/packages/rsbuild-plugin/src/cli/index.ts#L35 |
|
What if there are two build configurations with format |
|
Ahh yes, i forget this scene. The pr should be closed, i need to think this scene, especially i want to add ssr output as well |
Summary
hoist mf plugin to global
Related Links
Checklist